function GetAmountOfTrials()

load('Output.mat');
size(output.results(1).period{1}.block);

trialAmount = zeros(size(output.results,2),12);

for s = 1:size(output.results,2) %1:27
    for p = 1:size(output.results(s).period,2) %usually 1:4
        for b = 1:size(output.results(s).period{p}.block,2) %usually 1:3
        
            if isempty(output.results(s).period{p}.block{b}); continue; end;
            
            load(output.results(s).period{p}.block{b});
 
            trialAmount(s,((p-1)*3+b))= size(results.O1.trial,2); 
            
            disp(trialAmount);
            
        end
    end
end

    save('J:\PeakAnalysis\trialAmount.mat', '-v7.3', 'trialAmount');

end



%disp(size(results.O1.trial,2));


%         trials(2,t) = disp([output.subjects(i).Name])
% disp(['====> Subjects:']);
% for i = subjectNrs
%     disp(['     ' output.subjects(i).Name]);
% trials(1,1) = length(results.(electrode).trial);


% %          
% %             disp(['empty']);
%         %         end;
% %          else

%             trialAmount(2,1)
%             trialAmount(2,2)
%             trialAmount(2,3)
%             trialAmount(2,4)
%             trialAmount(2,5)
%             trialAmount(2,6)
%             trialAmount(2,7)
%             trialAmount(2,8)
%             trialAmount(2,9)
%             trialAmount(2,10)
%             trialAmount(2,11)
%             trialAmount(2,12)
%             
%             trialAmount(3,1)
%             trialAmount(3,2)
%             trialAmount(3,3)
%             trialAmount(3,4)
%             trialAmount(3,5)
%             trialAmount(3,6)
%             trialAmount(3,7)
%             trialAmount(3,8)
%             trialAmount(3,9)
%             trialAmount(3,10)
%             trialAmount(3,11)
%             trialAmount(3,12)
%             